﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Himp.Erp.Migrations
{
    /// <inheritdoc />
    public partial class add_column_drugcatalogtype_MatlCatgeCodg : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "MaterialWhseName",
                schema: "Erp",
                table: "MaterialWhses",
                newName: "MatlWhseName");

            migrationBuilder.RenameColumn(
                name: "MaterialWhseCodg",
                schema: "Erp",
                table: "MaterialWhses",
                newName: "MatlWhseCodg");

            migrationBuilder.RenameColumn(
                name: "SupplierName",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SplerName");

            migrationBuilder.RenameColumn(
                name: "SupplierCodg",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SplerCodg");

            migrationBuilder.RenameColumn(
                name: "SupplierCatgeName",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SplerCatgeName");

            migrationBuilder.RenameColumn(
                name: "SupplierCatgeCodg",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SplerCatgeCodg");

            migrationBuilder.RenameColumn(
                name: "MaterialInfoName",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MatlInfoName");

            migrationBuilder.RenameColumn(
                name: "MaterialInfoCodg",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MatlInfoCodg");

            migrationBuilder.RenameColumn(
                name: "MaterialCatgeName",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MatlCatgeName");

            migrationBuilder.RenameColumn(
                name: "MaterialCatgeCodg",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MatlCatgeCodg");

            migrationBuilder.AddColumn<string>(
                name: "MatlCatgeCodg",
                schema: "Erp",
                table: "DrugCatalogType",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "MatlCatgeName",
                schema: "Erp",
                table: "DrugCatalogType",
                type: "text",
                nullable: false,
                defaultValue: "");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "MatlCatgeCodg",
                schema: "Erp",
                table: "DrugCatalogType");

            migrationBuilder.DropColumn(
                name: "MatlCatgeName",
                schema: "Erp",
                table: "DrugCatalogType");

            migrationBuilder.RenameColumn(
                name: "MatlWhseName",
                schema: "Erp",
                table: "MaterialWhses",
                newName: "MaterialWhseName");

            migrationBuilder.RenameColumn(
                name: "MatlWhseCodg",
                schema: "Erp",
                table: "MaterialWhses",
                newName: "MaterialWhseCodg");

            migrationBuilder.RenameColumn(
                name: "SplerName",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SupplierName");

            migrationBuilder.RenameColumn(
                name: "SplerCodg",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SupplierCodg");

            migrationBuilder.RenameColumn(
                name: "SplerCatgeName",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SupplierCatgeName");

            migrationBuilder.RenameColumn(
                name: "SplerCatgeCodg",
                schema: "Erp",
                table: "MaterialSuppliers",
                newName: "SupplierCatgeCodg");

            migrationBuilder.RenameColumn(
                name: "MatlInfoName",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MaterialInfoName");

            migrationBuilder.RenameColumn(
                name: "MatlInfoCodg",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MaterialInfoCodg");

            migrationBuilder.RenameColumn(
                name: "MatlCatgeName",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MaterialCatgeName");

            migrationBuilder.RenameColumn(
                name: "MatlCatgeCodg",
                schema: "Erp",
                table: "MaterialInfos",
                newName: "MaterialCatgeCodg");
        }
    }
}
